<!DOCTYPE html>
<html>
<head>
    <title>Canvas 绘制图片示例</title>
</head>
<body>
    <canvas id="myCanvas"></canvas>

    <script type="text/javascript">
        var canvas = document.getElementById('myCanvas');
        var ctx = canvas.getContext('2d');

        var img = new Image();
        img.src = 'path/to/image.png';

        img.onload = function() {
            ctx.drawImage(img, 0, 0);
        };
    </script>
</body>
</html>
